package com.bw.module_device.adapter

import android.widget.ImageView
import com.bumptech.glide.Glide
import com.bw.module_device.R
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
/**
 * 智慧园区-01-设备管理-v1.1-吴熙-20250507
 */
class AddPicAdapter:BaseQuickAdapter<String,BaseViewHolder>(R.layout.item_pic) {
    override fun convert(holder: BaseViewHolder, item: String) {
        val imageView = holder.getView<ImageView>(R.id.iv_pic)
        if (item=="+"){
            holder.setImageResource(R.id.iv_pic, R.drawable.icon_add_black)
        }else{
            Glide.with(context).load(item).into(imageView)
        }

    }
}